package com.fjnldx.mes.controller.mes;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjnldx.mes.domain.domainRes.Result;
import com.fjnldx.mes.domain.pojo.ProductionPlan;
import com.fjnldx.mes.service.mes.MesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/mes/productionPlan")
@Api(value = "机台生产安排Mes_newscjh", tags = "机台生产安排Mes_newscjh")
public class MesController {
    @Resource
    MesService service;

    @GetMapping("/queryProductionPlan")
    @ApiOperation(value = "多条件查询生产计划-机台-mes_newscjh", notes = "多条件查询生产计划-机台-mes_newscjh")
    public Result queryDataDictionaryList(ProductionPlan data, Page page) {
        return service.queryProductionPlan(data, page);
    }

    @PostMapping("/addProductionPlan")
    @ApiOperation(value = "新增生产计划-机台-mes_newscjh", notes = "新增生产计划-机台-mes_newscjh")
    public Result addProductionPlan(ProductionPlan data) {
        return service.addProductionPlan(data);
    }

    @PostMapping("/modifyProductionPlan")
    @ApiOperation(value = "修改生产计划-机台-mes_newscjh", notes = "修改生产计划-机台-mes_newscjh")
    public Result modifyProductionPlan(ProductionPlan data) {
        return service.modifyProductionPlan(data);
    }

    @PostMapping("/deleteProductionPlan")
    @ApiOperation(value = "删除生产计划-机台-mes_newscjh", notes = "删除生产计划-机台-mes_newscjh")
    public Result deleteProductionPlan(String[] array) {
        return service.deleteProductionPlan(array);
    }
}
